import mongoengine as db

from app.db import BaseDocument


class ScanEvents(BaseDocument):
    meta = {
        'db_alias': 'wass',
        'collection': 'scan_events',
        'strict': False
    }

    event_id = db.StringField()
    event_type = db.IntField()
    event_name = db.StringField()
    detail = db.DictField()
    severity = db.IntField()
    task_id = db.StringField()
    task_session_id = db.StringField()
    job_id = db.StringField()
    user_id = db.StringField()
    target_url = db.StringField()
    target_id = db.StringField()
    job_name = db.StringField()
    created_at = db.DateTimeField()
    updated_at = db.DateTimeField()
